package cn.xydpeng.springframework.aop.framework;

import java.io.Serializable;

/**
 * Convenience superclass for configuration used in creating proxies,
 * to ensure that all proxy creators have consistent properties. --- 控制代理类创建的 配置类
 *
 * @author Rod Johnson
 * @author Juergen Hoeller
 * @see AdvisedSupport
 */
public class ProxyConfig implements Serializable {

    private boolean proxyTargetClass = false;

    private boolean optimize = false;

    /**
     * Return whether to proxy the target class directly as well as any interfaces. --- 是否直接代理目标类
     */
    public boolean isProxyTargetClass() {
        return this.proxyTargetClass;
    }

    public void setProxyTargetClass(boolean proxyTargetClass) {
        this.proxyTargetClass = proxyTargetClass;
    }

    /**
     * Return whether proxies should perform aggressive optimizations.  --- 是否优化代理过程
     */
    public boolean isOptimize() {
        return this.optimize;
    }

    public void setOptimize(boolean optimize) {
        this.optimize = optimize;
    }
}
